#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int Func(int n, int m)
{
	int sum = 0;
	int num = 0;
	for (int i = 0; i < n; i++)
	{
		num = num * 10 + m;
		sum += num;
	}
	return sum;
}
int main()
{
	int sum = Func(5, 2);
	printf("%d\n", sum);
	return 0;
}